
        
        <script language="javascript" src="javascript/AjaxUpload.2.0.min.js"></script>
        <script language="javascript">
        $(document).ready(function(){
                var button = $('#upload_button'), interval;
                new AjaxUpload('#upload_button', {
                action: '../controlador/upload.php',
                        onSubmit : function(file , ext){
                        if (! (ext && /^(jpg|png|jpeg|gif)$/.test(ext))){
                                // extensiones permitidas
                                alert('Error: Solo se permiten imagenes');
                                // cancela upload
                                return false;
                        } else {
                                button.text('Uploading');
                                this.disable();
                        }
                        },
                        onComplete: function(file, response){
                                button.text('Upload');
                                // enable upload button
                                this.enable();			
                                // Agrega archivo a la lista
                                $('#lista').appendTo('.files').text(file);
                        }	
                });
        });
        </script>

       
      
        <div>
        <form name="aa" id="aa" action="#" enctype="multipart/form-data" method="post" onsubmit="guardar(); return false">
            
            <table>
                
                
                    <tr>
                    <td style="text-align: right">Nombre</td>
                    <td>
                        <input type="text" name="nombre" id="nombre" size="20" >
                    </td>
                    <td style="text-align: right">Tipo</td>
                    
                    <td>
                        <select id="tipo" name="tipo">
                            <option value="Desayuno">Desayuno</option>
                            <option value="Almuerzo">Almuerzo</option>
                            <option value="Refresco">Refresco</option>
                            <option value="Postre">Postre</option>
                        </select>
                    </td>
                    </tr>
                    
                    
                    <tr>
                    <td style="text-align: right">Precio</td>
                    <td>
                        <input type="text"  id="precio" name="precio" size="20">
                    </td>
                    </tr>
                    
                    <tr>
                    <td style="text-align: right">Disponible</td>
                    <td>
                        <input type="checkbox" name="disponible" id="disponible" value="1">
                    </td>
                    </tr>
                    <tr>
                    <td style="text-align: right">Descripción</td>
                    <td colspan="3">
                        <div id="editor2" style="width: 100%"></div>
                        
                    </td>
                    </tr>
                    <tr>
                    
                        <td></td><td>
                        <div id="upload_button">Upload</div>
                        
                    </td>
                    <td>
                        <input type="submit" value="Guardar"></input>
                    </td>
                    
                    </tr>
                    

               
            </table> 
        </form><div id="resultado"></div>
        
        
        
        
        <script>
            
            var editor;
            var config = {language: 'es'}
            
	$(function() {
                
        //editor = CKEDITOR.replace('editor2',config);
        editor = CKEDITOR.appendTo("editor2",config);
                
        
	});
        
        
        function obtenerComentario(){
            comentario = editor.getData();
            return comentario;
        }
        
	</script>
        
        
        
      </div>
        

